using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class tbs_Disabled_triggersMap : EntityTypeConfiguration<tbs_Disabled_triggers>
    {
        public tbs_Disabled_triggersMap()
        {
            // Primary Key
            this.HasKey(t => new { t.Trigger_Name, t.status });

            // Properties
            this.Property(t => t.Trigger_Name)
                .IsRequired()
                .HasMaxLength(128);

            this.Property(t => t.Table_Name)
                .HasMaxLength(128);

            this.Property(t => t.status)
                .IsRequired()
                .HasMaxLength(8);

            // Table & Column Mappings
            this.ToTable("tbs_Disabled_triggers");
            this.Property(t => t.Trigger_Name).HasColumnName("Trigger Name");
            this.Property(t => t.Table_Name).HasColumnName("Table_Name");
            this.Property(t => t.status).HasColumnName("status");
        }
    }
}
